package cn.hesion.springbootmq.consumer;
/**
 * ClassName: MQConsumer <br/>
 * Description: <br/>
 * date: 2021/11/9 11:09<br/>
 *
 * @author Hesion<br />
 * @version
 * @since JDK 1.8
 */

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * 消费者
 * @author: hesion
 * @create: 2021-11-09 11:09
 **/
@Slf4j
//@Component
//@RocketMQMessageListener(topic = "springboot-mq",selectorExpression = "tom",selectorType = SelectorType.TAG,consumerGroup = "springMQTest-consumer-1")
public class MQFilterConsumer implements RocketMQListener<MessageExt> {
    @Override
    public void onMessage(MessageExt messageExt) {
        log.info("MQFilterConsumer-----Receive message："+messageExt);
    }
}